function changeBlockUser(id, blocked){
	var newBlocked;
	$.ajax({
		url : "changeBlockUser.php",
				data : {
					idUser : id,
					block : blocked
				},
				async : false,
				dataType : "text"
	}).done(function(res){
		newBlocked = parseInt(res);
	});
	
	var content = '<button onclick="changeBlockUser(' +id+','+newBlocked+')">';
	if(newBlocked){
		 content += 'Unblock';
	}else{
		content += 'Block';
	}
	content+='</button>';
	
	$("#button"+id).html(content);
}
